import Cookies from 'js-cookie'

const TokenKey = 'zhongtai-Token'
const InfoKey = 'zhongtai-Info'
const CompanyId = 'Company-Id'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getInfo() {
	localStorage.getItem(InfoKey)
  return Cookies.get(InfoKey)
}

export function setInfo(info) {
	localStorage.setItem(InfoKey,info)
  return Cookies.set(InfoKey, info)
}

export function removeInfo() {
	localStorage.removeItem(InfoKey)
  return Cookies.remove(InfoKey)
}

export function getCompanyId() {
  return Cookies.get(CompanyId)
}

export function setCompanyId(info) {
  return Cookies.set(CompanyId, info)
}

export function removeCompanyId() {
  return Cookies.remove(CompanyId)
}